<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="${pageContext.request.contextPath}" var="path"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主页</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/assets/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/assets/css/bootstrap-theme.css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/assets/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/assets/js/bootstrap.min.js"></script>
</head>
<body>
	欢迎您：
	<a href="${pageContext.request.contextPath}/selfInfo">${user.name }</a>
	<div class="table-responsive">
		<table class="table">
			<p>
				<span>商品列表</span>
				<a href="${pageContext.request.contextPath}/addProduct" class="btn btn-primary">增加商品</a>
			</p>
			<thead>
				<tr>
					<th>序号</th>
					<th>产品</th>
					<th>简介</th>
					<th>更新时间</th>
					<th>库存</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${products}" var="product">
					<tr>
						<td>${product.id }</td>
						<td>${product.name }</td>
						<td>${product.description }</td>
						<td>${product.updataTime }</td>
						<td>${product.count }</td>
						<td><a href="${path }/productInfo?id=${product.id }">修改</a> <a
							href="${path }/productInfo?id=${product.id }">查看</a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</body>
</html>



